//
// Created by wxd on 2025/7/27.
//

#include "OrthogonalCamera.h"
#include <glm/glm.hpp>

#include "glm/ext/matrix_clip_space.hpp"

OrthogonalCamera::~OrthogonalCamera() {

}

OrthogonalCamera::OrthogonalCamera() {
    m_OrthoBox = {};
}

OrthogonalCamera::OrthogonalCamera(const float l, const float r, const float t, const float b, const float n, const float f) {
    m_OrthoBox.left = l;
    m_OrthoBox.right = r;
    m_OrthoBox.top = t;
    m_OrthoBox.bottom = b;
    m_OrthoBox.zNear = n;
    m_OrthoBox.zFar = f;
}


glm::mat4 OrthogonalCamera::getProjectMatrix() {
    m_ProjectMatrix = glm::ortho(m_OrthoBox.left, m_OrthoBox.right, m_OrthoBox.bottom, m_OrthoBox.top, m_OrthoBox.zNear, m_OrthoBox.zFar);
    return m_ProjectMatrix;
}



